package com.applet.code.exception;

/**
 * 错误码
 */
public enum ResultCode {

    /**
     * 成功
     */
    SUCCESS("0", "success"),

    /**
     * 未知错误
     */
    UNKNOWN_ERROR("505", "服务器异常"),

    /**
     * 业务异常
     */
    BUSINESS_ERROR("503", "业务异常"),

    /**
     * 登录超时
     */
    TOKEN_ERROR("401", "会话已过期"),

    /**
     * 参数校验失败
     */
    PARAN_ERROR("504", "参数校验失败");


    private String code;

    /**
     * 结果码描述
     */
    private String msg;


    ResultCode(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public String getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
